export default{
		register(state,userId){
				const date=new Date();
				const user=state.users.find(user=>{
					return user.id==userId
				});
				user.registered=true;				
				state.registors.push({
			        id:userId,
			        name:user.name,
			        date:date.getMonth()+'/'+date.getDay()
			      });
		},
		unregister(state,payload){
			const usr = state.users.find((user)=>{
	            return user.id == payload.userId;
	        });
	        usr.registered = false;
	        const userToDel = state.registors.find(user=>{
	        	return user.id==payload.userId

	        })
	        state.registors.splice(state.registors.indexOf(userToDel),1);

		}
}